home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
IRIX 6.2 Applications 1996 May
/
SGI IRIX 6.2 Applications 1996 May.iso
/
dist
/
impr_dev.idb
/
usr
/
include
/
printstiff.h.z
/
printstiff.h
Wrap
C/C++ Source or Header
|
1996-05-06
|
5KB
|
145 lines
/**************************************************************************
*
* Copyright (c) 1992 Silicon Graphics, Inc.
* All Rights Reserved
*
* THIS IS UNPUBLISHED PROPRIETARY SOURCE CODE OF SGI
*
* The copyright notice above does not evidence any actual of intended
* publication of such source code, and is an unpublished work by Silicon
* Graphics, Inc. This material contains CONFIDENTIAL INFORMATION that is
* the property of Silicon Graphics, Inc. Any use, duplication or
* disclosure not specifically authorized by Silicon Graphics is strictly
* prohibited.
*
* RESTRICTED RIGHTS LEGEND:
*
* Use, duplication or disclosure by the Government is subject to
* restrictions as set forth in subdivision (c)(1)(ii) of the Rights in
* Technical Data and Computer Software clause at DFARS 52.227-7013,
* and/or in similar or successor clauses in the FAR, DOD or NASA FAR
* Supplement. Unpublished - rights reserved under the Copyright Laws of
* the United States. Contractor is SILICON GRAPHICS, INC., 2011 N.
* Shoreline Blvd., Mountain View, CA 94039-7311
**************************************************************************
*
* File: printstiff.h
*
* Description: API for printing related uses of Stream TIFF files. This
* API builds upon the base STIFF API of libstiff.a. All base STIFF
* functions may be used with this print file API.
*
* The primary additions to base STIFF introduced by this API are
* an expanded image header for the storing of additional tags
* in STIFF file.
*
* Refer to the header file stiff.h for additional information about
* the STIFF API.
*
**************************************************************************/
#ident "$Revision: 1.6 $"
#ifndef _PST_PRINTSTIFF_H
#define _PST_PRINTSTIFF_H
#include "stiff.h"
/* Resolution units */
typedef unsigned short PSTResUnit;
#define PST_RES_UNIT_NONE 1 /* No units */
#define PST_RES_UNIT_INCH 2 /* Resolution in inches */
#define PST_RES_UNIT_CENTIMETER 3 /* Resolution in centimeters */
/* Dither or halftone method */
typedef unsigned short PSTThreshold;
#define PST_THRESHOLD_NONE 1 /* No dithering or halftoning */
#define PST_THRESHOLD_ORDERED 2 /* Ordered dither or halftone */
#define PST_THRESHOLD_RANDOM 3 /* Random (e.g. error diffusion) */
/* Compression methods */
typedef unsigned short PSTCompression;
#define PST_COMPRESSION_NONE 1 /* No compression */
#define PST_COMPRESSION_CCITT_3 2 /* CCITT Group 3 */
#define PST_COMPRESSION_CCITT_T4 3 /* CCITT Group 3 T4 */
#define PST_COMPRESSION_CCITT_T6 4 /* CCITT Group 4 T6 */
#define PST_COMPRESSION_LZW 5 /* Lempel-Ziv & Welch */
#define PST_COMPRESSION_JPEG 6 /* Joint Photo Experts Group */
#define PST_COMPRESSION_PACK 32773 /* TIFF pack bits */
/* Print STIFF IFD tag structure */
typedef struct pst_imghdr {
unsigned long width, height; /* Image width and height, dots */
unsigned short bitsPerSample; /* Bits per color component */
unsigned short samplesPerPixel; /* Number of components per dot */
unsigned long imgbytes; /* Total number of bytes in image */
STType type; /* Image colorspace */
STPlane plane; /* Image data format */
PSTResUnit resUnit; /* Resolution units */
unsigned long xRes, yRes; /* X/Y resolution, dots per resUnit */
PSTThreshold thresholding; /* Dither mechanism */
PSTCompression compression; /* Compression method */
char *dateTime; /* Image time stamp */
char *hostComputer; /* Computer image was created on */
char *software; /* Software used to create image */
char *docName; /* Name of document */
char *targetPrinter; /* Destination printer */
unsigned short pageNumbers[2]; /* Page numbers */
/* [0] = current page number */
/* [1] = total pages (0=unknown) */
char *driverOptions; /* Command line options for driver */
} PSTImageHeader;
/* Private data structure for STSGIPrinting tag data entries */
/*
The STSGIPrinting private tag item will point to a block
of these structures, one for each Printing specific data
item. This structure resembles the STTag structure except
that the data is written into data regardless of its size.
There are no pointers to a data section following the
structure.
The type field uses the same ST_TAG_TYPE defines as a regular
TIFF tag.
*/
typedef struct pst_private_data {
unsigned short private_id; /* Data item ID */
STTagType type; /* Data type */
unsigned long len; /* Number of items of type */
char data[4]; /* Data - dummy for pointer */
} PSTPrivateData;
/* Private data IDs */
#define PSTPrivateDriverOptions 1
/* Public functions */
#ifdef __cplusplus
extern "C" {
#endif
extern int PSTReadImageHeader(STStream *st, PSTImageHeader *hd);
extern int PSTWriteImageHeader(STStream *st, PSTImageHeader *hd, int last);
#ifdef __cplusplus
}
#endif
#endif /* _PST_PRINTSTIFF_H */